package com.meowcook.pojo.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * Created with Intellij IDEA.
 * Description:
 * User: 28792
 * Date: 2025-05-17
 * Time: 19:37
 */
@Data
@ApiModel("回复信息")
public class ReplyDTO {
    @NotNull
    @ApiModelProperty(value = "回复id", required = true)
    private Long commentId;

    @NotNull
    @ApiModelProperty(value = "食谱id", required = true)
    private Long recipeId;

    @JsonIgnore
    private Long userId;

    @ApiModelProperty(value = "被回复用户昵称, 非必传项")
    private String repliedUserNickname;

    @ApiModelProperty(value = "楼中楼回复id，非必传项")
    private Long replyId;

    @NotBlank
    @NotNull
    @Length(max = 300, min = 1,  message = "回复内容长度不能超过300个字符,不能小于1个字符")
    @ApiModelProperty(value = "回复内容，不能超过300个字符", required = true)
    private String content;
}
